package portal.monitor.utils;

import java.io.IOException;
import java.util.Properties;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component
@Scope("singleton")
public class MonConfig {

	  public static String localhost;
	  public static String remoteBase;
	  public static String remoteExecPath;
	  public static String localBase;
	  public static String winrar;
	  public static String remoteTxtPath;
	  
	  public static String conSplit;
	  public static String execclientUri;
	  public static String fileclient;
//	  public static String patternFileUri;
	  
	  public static String GISexe;
	  public static String SPexe;
	  
	  public static boolean useCopy;
	
	 static {
			Properties httpPro = new Properties();
			try {
				httpPro.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("remote.properties"));
			} catch (IOException e) {
				e.printStackTrace();
			}
		
			 localhost = httpPro.getProperty("remote.localhost");
			 remoteBase = httpPro.getProperty("remote.remoteBase");
			 remoteExecPath = httpPro.getProperty("remote.remoteExecPath");
			 localBase = httpPro.getProperty("remote.localBase");
			 conSplit = httpPro.getProperty("remote.conSplit");
			 execclientUri = httpPro.getProperty("remote.execclientUri");
			 fileclient = httpPro.getProperty("remote.fileclientUri");
			 GISexe = httpPro.getProperty("GISexe");
			 SPexe = httpPro.getProperty("SPexe");
			 winrar = httpPro.getProperty("remote.winrar");
			 remoteTxtPath = httpPro.getProperty("remote.remoteTxtPath");
			 useCopy = httpPro.getProperty("remote.useCopy").equals("true")?true:false;
//			 patternFileUri = httpPro.getProperty("remote.patternScript");
	 } 
	 
}
